import service from ".";
import qs from "qs";
const repairerApi = {
    insert(employee) {
        return service.post('/admin/employee', employee);

    },
    delete(rid) {
        return service.delete(`/admin/employee/${rid}`);

    },
    update(employee) {
        return service.post('/admin/employee/update', employee);

    },
    selectByPage(pageNum,rname) {
        return service.get('/admin/employee',{
            params:{
                pageNum,
                rname
            }
        });

    },
    selectByRid(rid) {
        return service.get(`/admin/employee/${rid}`);

    },
    selectAll() {
        return service.get('/admin/employee/selectAll');
    },
    //查询当前维修工所属的维修任务
    selectTaskByRid(rid) {
        return service.get(`/repairer/${rid}`);
    },
    // 调用处理员工离职的接口
    handleEmployeeResignation(rid) {
        return service.delete(`/admin/repairTask/employee/${rid}`);
    },
    insertAdmin(admin){
        return service.post('/admin/employee/account', admin);
    },
    updateAdmin(admin){
        return service.post('/admin/employee/Aupdate', admin);
    },
    //查询个人信息
    selectInfoByRid() {
        return service.get("/repairer/getRepairmenInfo");
    }
    
};
export default repairerApi;